{% load i18n %}<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8">
	<title>{{ newsletter.title }}: {{ message.title }}</title>
</head>
<body>
    <h1>{{ newsletter.title }}</h1>
    <h2>{{ message.title }}</h2>
    {% for article in message.articles.all %}
        <h3>{{ article.title }}</h3>

        {% if article.image and not article.image_below_text %}{% include thumbnail_template %}{% endif %}

        <div>{{ article.text|safe }}</div>
        {% if article.url %}
            <div><a href="{{ article.url }}">{% trans "Read more" %}</a></div>
        {% endif %}

        {% if article.image and article.image_below_text %}{% include thumbnail_template %}{% endif %}
    {% endfor %}
    <ul>
        {% if submission.publish %}
        <li><a href="{{ site_url }}{{ submission.get_absolute_url }}">{% trans "Read message online" %}</a></li>
        {% endif %}
        {% if newsletter.enable_unsubscribe %}
        <li><a href="{{ site_url }}{% url 'newsletter_unsubscribe_request' newsletter.slug %}">{% trans "Unsubscribe" %}</a></li>
        {% endif %}
    </ul>
    {% if attachment_links %}
        {% for att in message.attachments.all %}
            {% if forloop.first %}
                <strong>{% trans "Attachments" %}</strong>
                <table>
            {% endif %}
            <tr>
                <td>
                    &#128206; <a href="{{ att.file.url }}">{{ att.file_name }}</a> ({{ att.file.size|filesizeformat }})
                </td>
            </tr>
            {% if forloop.last %}
                </table>
            {% endif %}
        {% endfor %}
    {% endif %}
</body>
</html>
